package jc.src.猫和狗;

public class Demo {
    public static void main(String[] args) {
        dog d = new dog();
        d.setName("张三");
        d.setAge(20);
        System.out.println(d.getName() + "," + d.getAge());
        d.eat();
        dog d1=new dog("张三",20);
        System.out.println(d1.getName()+","+d1.getAge());
        d1.eat();

        cat c=new cat();
        c.setName("李四");
        c.setAge(10);
        System.out.println(c.getName()+","+c.getAge());
        c.play();
        cat c1=new cat("李四",10);
        System.out.println(c1.getName()+","+c1.getAge());
        c1.play();
    }
}
